<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* @keyframes 规则用于创建动画。在 @keyframes 中规定某项 CSS 样式，
        就能创建由当前样式逐渐改为新样式的动画效果 */

        @keyframes myfirst {
            0% {
                background-color: red;
            }
            10% {
                width: 30px;
                height: 30px;
            }

            20% {
                width: 60px;
                height: 60px;
            }

            30% {
                width: 90px;
                height: 90px;
                background-color: azure;
            }

            40% {
                width: 120px;
                height: 120px;
            }

            50% {
                width: 150px;
                height: 150px;
            }

            60% {
                width: 180px;
                height: 180px;
                background-color: black;
            }

            70% {
                width: 210px;
                height: 210px;
                transform: translate(60px,30px);
            }

            80% {
                width: 240px;
                height: 240px;
                transform: rotate(30deg);
            }

            90% {
                width: 270px;
                height: 270px;
            }

            100% {
                width: 300px;
                height: 300px;
                background-color: blue;
            }
        }

        div {
            /* 
         需要把动画绑定到选择器上 
         需要绑定：
            1、动画名称
            2、动画的时长
        */
            animation: myfirst 10s;
            
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>